home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1997 May / Pcwk0597.iso / optimus / agata / home.dir / 00006_1 chan.ls < prev    next >
Encoding:
Text File  |  1997-02-20  |  510 b   |  25 lines

  1. property myChan, maxFrames, currFrame, castList
  2. global theCoord
  3.  
  4. on birth me, chan
  5.   set myChan to chan
  6.   set the stretch of sprite myChan to 0
  7.   return me
  8. end
  9.  
  10. on startAnimation me
  11.   set currFrame to 1
  12. end
  13.  
  14. on Animate me
  15.   if currFrame <= maxFrames then
  16.     set castIndex to getAt(castList, currFrame)
  17.     set the castNum of sprite myChan to castIndex
  18.   end if
  19.   if currFrame > maxFrames then
  20.     set the castNum of sprite myChan to 0
  21.     RemoveBOL(theCoord, me)
  22.   end if
  23.   set currFrame to currFrame + 1
  24. end
  25.